package com.roowoo.plateform.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/***
 * @project: spring-cloud
 * @package: com.roowoo.plateform.config
 * @description: spring-cloud restTemplate初始化
 * @author: kyrie
 * @mail: 18654169290@163.com
 * @createDate: 2022/3/17 17:36
 */
@Configuration
public class RestTemplateAutoConfiguration {

    @Bean("restTemplate")
    @LoadBalanced
    public RestTemplate init() {
        return new RestTemplate();
    }
}
